<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="jump" uri="/jump/taglib"%>
<%String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<base href="<%=basePath%>admin/base/vehicle/">

<script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>
<title>无标题文档</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.STYLE1 {font-size: 12px}
.STYLE4 {
	font-size: 12px;
	color: #1F4A65;
	font-weight: bold;
}

a:link {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;

}
a:visited {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;
}
a:hover {
	font-size: 12px;
	color: #FF0000;
	text-decoration: underline;
}
a:active {
	font-size: 12px;
	color: #FF0000;
	text-decoration: none;
}
.STYLE7 {font-size: 12}
-->

/* zgz add */
#BgDiv {
	background-color: #e3e3e3;
	position: absolute;
	z-index: 99;
	left: 0;
	top: 0;
	display: none;
	width: 100%;
	height: 1000px;
	opacity: 0.5;
	filter: alpha(opacity = 50);
	-moz-opacity: 0.5;
}

#DialogDiv {
	position: absolute;
	width:350px; 
	left:50%; 
	top:50%;
	margin-left:-180px; 
	z-index: 100;
	background-color: #fff;
	border: 15px #FFCC33 solid;
	text-align: center;
	font-size: 12px;
	/*padding: 1px;*/
}
#title {
    background-color: #FFCC33;
    font-size: 15px;
    height: 20px;
    text-align: left;
}
#title a {
    font-size: 15px;
    position: absolute;
	right: 2px;
    cursor: pointer；
}
#title a:link{
	text-decoration:none
} 

#DialogDiv .form {
	display:none;
	text-align: center;
	margin-top:15px;
	margin-left: 60px;
}
#new{
	display:none;
}
</style>

<script>
var  highlightcolor='#eafcd5';
//此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行,还没搞清楚为什么:(
var  clickcolor='#51b2f6';
function  changeto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=highlightcolor&&source.id!="nc"&&cs[1].style.backgroundColor!=clickcolor)
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=highlightcolor;
}
}

function  changeback(){
if  (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="nc")
return
if  (event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
//source.style.backgroundColor=originalcolor
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}

function  clickto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=clickcolor&&source.id!="nc")
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=clickcolor;
}
else
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}

//zgz add 弹出div 开始
	function show(){
			$("#BgDiv").css( {
				display : "block",
				height : $(document).height(),
			});
			var yscroll = document.documentElement.scrollTop;
			$("#DialogDiv").css("top", "100px");
			$("#DialogDiv").css("display", "block");
			
			$(".form").css("display","block");
			
			document.documentElement.scrollTop = 0;
	}
	
	function hide(){
	    $("#BgDiv").css("display", "none");
	    $("#DialogDiv").css("display", "none");	
	}
	
	function add(){
	    $("#BgDiv").css("display", "none");
	    $("#DialogDiv").css("display", "none");
	    $("#new").css("display", "block");
	    	
	}
</script>
<!--  zgz add 弹出div 结束    -->



</head>

<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="15" height="30"><img src="../../tab/images/tab_03.gif" width="15" height="30" /></td>
        <td width="1101" background="../../tab/images/tab_05.gif"><img src="../../tab/images/311.gif" width="16" height="16" /> <span class="STYLE4">车辆信息列表</span></td>
        <td width="281" background="../../tab/images/tab_05.gif"><table border="0" align="right" cellpadding="0" cellspacing="0">
            <tr>
              <td width="60"><table width="87%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td class="STYLE1"><div align="center">
                        <input type="checkbox" name="checkbox62" value="checkbox" />
                    </div></td>
                    <td class="STYLE1"><div align="center">全选</div></td>
                  </tr>
              </table></td>
              <td width="60"><table width="90%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td class="STYLE1"><div align="center"><img src="../../tab/images/001.gif" width="14" height="14" /></div></td>
                    <td class="STYLE1"><div align="center"><a onclick="" href="AddVehicle.jsp">新增</a></div></td>
                  </tr>
              </table></td>
              
              <td width="52"><table width="88%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td class="STYLE1"><div align="center"><img src="../../tab/images/083.gif" width="14" height="14" /></div></td>
                    <td class="STYLE1"><div align="center">删除</div></td>
                  </tr>
              </table></td>
            </tr>
        </table></td>
        <td width="14"><img src="../../tab/images/tab_07.gif" width="14" height="30" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="9" background="../../tab/images/tab_12.gif">&nbsp;</td>
        <td bgcolor="#f3ffe3"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#c0de98" onmouseover="changeto()"  onmouseout="changeback()">
         <tr>
            <td width="10%" height="26" background="../../tab/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2 STYLE1">选择</div></td>
            <td width="19%" height="26" background="../../tab/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2 STYLE1">车辆名称</div></td>
            
            <td width="19%" height="26" background="../../tab/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2 STYLE1">车牌号</div></td>
            <td width="19%" height="26" background="../../tab/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2 STYLE1">车型</div></td>
            <td width="19%" background="../../tab/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2 STYLE1">载重量</div></td>
            <td  width="7%" height="26" background="../../tab/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">编辑</div></td>
            <td width="7%" height="26" background="../../tab/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">删除</div></td> 
          </tr>
  			<c:forEach items="${vehicleList }" var="vehicle">
           <tr>
            <td height="18" bgcolor="#FFFFFF"><div align="center" class="STYLE1">
              <input name="checkbox" type="checkbox" class="STYLE2" value="checkbox" />
            </div></td>
            <td height="18" bgcolor="#FFFFFF" class="STYLE2"><div align="center" class="STYLE2 STYLE1">${vehicle.name }</div></td>
            
            <td bgcolor="#FFFFFF"><div align="center" class="STYLE2 STYLE1">${vehicle.numberPlate }</div></td>
            <td height="18" bgcolor="#FFFFFF"><div align="center" class="STYLE2 STYLE1">${vehicle.model }</div></td>
            <td bgcolor="#FFFFFF"><div align="center" class="STYLE2 STYLE1">${vehicle.loadingCapacity }</div></td>
            <td height="18" bgcolor="#FFFFFF"><div align="center"><img src="../../tab/images/037.gif" width="9" height="9" /><span class="STYLE1"> [</span><a href="to-update?vehicle.id=${vehicle.id }">编辑</a><span class="STYLE1">]</span></div></td>
            <td height="18" bgcolor="#FFFFFF"><div align="center"><span class="STYLE2"><img src="../../tab/images//010.gif" width="9" height="9" /> </span><span class="STYLE1">[</span><a href="delete?vehicle.id=${vehicle.id }">删除</a><span class="STYLE1">]</span></div></td>
          </tr>
          
            </c:forEach>        
          
         
        </table></td>
        <td width="9" background="../../tab/images/tab_16.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="29"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="15" height="29"><img src="../../tab/images/tab_20.gif" width="15" height="29" /></td>
        <td background="../../tab/images/tab_21.gif">
        	<jump:page total="${total }" page="${page}" property="page" action="list"></jump:page>
        </td>
        <td width="14"><img src="../../tab/images/tab_22.gif" width="14" height="29" /></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>